package com.ruoyi.project.cwsk.channel.domain;

import java.util.Date;
import java.util.List;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import com.ruoyi.project.system.user.domain.User;

/**
 * 渠道商管理对象 sys_channel
 * 
 * @author songzc
 * @date 2019-12-27
 */
public class Channel extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** null */
    private Integer id;

    /** 渠道商简称 */
    @Excel(name = "渠道商简称")
    private String name;

    /** QQ */
    private String qq;

    /** 手机号 */
    @Excel(name = "手机号")
    private String mobile;

    /** 联系人 */
    @Excel(name = "联系人")
    private String contact;

    /** 渠道商关联的帐号 */
    @Excel(name = "渠道商关联的帐号")
    private Long userId;

    /** 此渠道所属的推广员 */
    @Excel(name = "此渠道所属的推广员")
    private Long promoterId;
    
    List<Long> promoterIds;

    /** 结算开始日期 */
    private Date settleStartDate;

    /** 结算周期（0=不结算 1=日结算 2=周结算 3=半月结算 4=月结算） */
    private Integer settlePeriod;

    /** 结算方式（1=对公 2=对私） */
    private Integer settleType;

    /** 代理渠道商ID */
    private Integer agentChannelId;

    /** 代理渠道商账户ID */
    private Integer agentUserId;

    /** 收款方户名 */
    private String accountName;

    /** 收款方开户行 */
    private String accountBank;

    /** 收款方帐号 */
    private String accountNumber;

    /** 渠道商类型（NORMAL普通 GUILD公会 UNION联盟 AGENT代理商 STUDIO工作室 ANCHOR主播 SITES网站 APP应用 WechatH5微信H5 OTHER其他） */
    @Excel(name = "渠道商类型", readConverterExp = "N=ORMAL普通,G=UILD公会,U=NION联盟,A=GENT代理商,S=TUDIO工作室,A=NCHOR主播,S=ITES网站,A=PP应用,W=echatH5微信H5,O=THER其他")
    private String model;

    /** 是否启用（1=正常 0=禁用） */
    @Excel(name = "是否启用", readConverterExp = "1==正常,0==禁用")
    private Integer enabled;

    /** 是否允许创建子用户（0不允许 1允许） */
    @Excel(name = "是否允许创建子用户", readConverterExp = "0=不允许,1=允许")
    private Integer subUser;

    /** 字母缩写 */
    @Excel(name = "字母缩写")
    private String acronym;

    /** 合作状态：1 试合作、2 正式合作、3 停止合作 */
    private Integer cooperaState;

    /** 渠道商全称 */
    private String fullName;

    /** 是否允许查看渠道收益统计(1 有权，0 无权) */
    private Integer channelProfitpower;

    /** 是否允许查看用户注册明细(1 有权，0 无权) */
    private Integer registrationPower;

    /** 是否允许查看充值明细(1 有权，0 无权) */
    private Integer rechargePower;

    /** 是否允许查看游戏收益统计(1 有权，0 无权) */
    private Integer gameIncomestatPower;

    /** 是否允许代充（1 允许，0 不允许） */
    private Integer allowGeneration;

    /** 是否允许查看CPS用户注册明细(1 有权，0 无权) */
    private Integer cpsRegistrationPower;

    /** 代缴税率 */
    private Double replaceTaxRate;

    /** 税率 */
    private Double taxRate;

    /** 渠道logo;示例 xxxxx.png */
    private String logo;

    /** 是否允许查看所属玩家信息（1 有权，0无权） */
    private Integer searchAscripUserPower;

    /** 是否允许查看IOS充值明细(1 有权，0 无权) */
    private Integer iosRechargePower;
    
    
    private User user;
	private User promoter;
	

	public List<Long> getPromoterIds() {
		return promoterIds;
	}

	public void setPromoterIds(List<Long> promoterIds) {
		this.promoterIds = promoterIds;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public User getPromoter() {
		return promoter;
	}

	public void setPromoter(User promoter) {
		this.promoter = promoter;
	}

	public void setId(Integer id) 
    {
        this.id = id;
    }

    public Integer getId() 
    {
        return id;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setQq(String qq) 
    {
        this.qq = qq;
    }

    public String getQq() 
    {
        return qq;
    }
    public void setMobile(String mobile) 
    {
        this.mobile = mobile;
    }

    public String getMobile() 
    {
        return mobile;
    }
    public void setContact(String contact) 
    {
        this.contact = contact;
    }

    public String getContact() 
    {
        return contact;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
    	if(user!=null){
			return user.getUserId();
		}
		return userId;
    }
    public void setPromoterId(Long promoterId) 
    {
        this.promoterId = promoterId;
    }

    public Long getPromoterId() 
    {
    	if(promoter!=null){
			return promoter.getUserId();
		}
		return promoterId;
    }
    public void setSettleStartDate(Date settleStartDate) 
    {
        this.settleStartDate = settleStartDate;
    }

    public Date getSettleStartDate() 
    {
        return settleStartDate;
    }
    public void setSettlePeriod(Integer settlePeriod) 
    {
        this.settlePeriod = settlePeriod;
    }

    public Integer getSettlePeriod() 
    {
        return settlePeriod;
    }
    public void setSettleType(Integer settleType) 
    {
        this.settleType = settleType;
    }

    public Integer getSettleType() 
    {
        return settleType;
    }
    public void setAgentChannelId(Integer agentChannelId) 
    {
        this.agentChannelId = agentChannelId;
    }

    public Integer getAgentChannelId() 
    {
        return agentChannelId;
    }
    public void setAgentUserId(Integer agentUserId) 
    {
        this.agentUserId = agentUserId;
    }

    public Integer getAgentUserId() 
    {
        return agentUserId;
    }
    public void setAccountName(String accountName) 
    {
        this.accountName = accountName;
    }

    public String getAccountName() 
    {
        return accountName;
    }
    public void setAccountBank(String accountBank) 
    {
        this.accountBank = accountBank;
    }

    public String getAccountBank() 
    {
        return accountBank;
    }
    public void setAccountNumber(String accountNumber) 
    {
        this.accountNumber = accountNumber;
    }

    public String getAccountNumber() 
    {
        return accountNumber;
    }
    public void setModel(String model) 
    {
        this.model = model;
    }

    public String getModel() 
    {
        return model;
    }
    public void setEnabled(Integer enabled) 
    {
        this.enabled = enabled;
    }

    public Integer getEnabled() 
    {
        return enabled;
    }
    public void setSubUser(Integer subUser) 
    {
        this.subUser = subUser;
    }

    public Integer getSubUser() 
    {
        return subUser;
    }
    public void setAcronym(String acronym) 
    {
        this.acronym = acronym;
    }

    public String getAcronym() 
    {
        return acronym;
    }
    public void setCooperaState(Integer cooperaState) 
    {
        this.cooperaState = cooperaState;
    }

    public Integer getCooperaState() 
    {
        return cooperaState;
    }
    public void setFullName(String fullName) 
    {
        this.fullName = fullName;
    }

    public String getFullName() 
    {
        return fullName;
    }
    public void setChannelProfitpower(Integer channelProfitpower) 
    {
        this.channelProfitpower = channelProfitpower;
    }

    public Integer getChannelProfitpower() 
    {
        return channelProfitpower;
    }
    public void setRegistrationPower(Integer registrationPower) 
    {
        this.registrationPower = registrationPower;
    }

    public Integer getRegistrationPower() 
    {
        return registrationPower;
    }
    public void setRechargePower(Integer rechargePower) 
    {
        this.rechargePower = rechargePower;
    }

    public Integer getRechargePower() 
    {
        return rechargePower;
    }
    public void setGameIncomestatPower(Integer gameIncomestatPower) 
    {
        this.gameIncomestatPower = gameIncomestatPower;
    }

    public Integer getGameIncomestatPower() 
    {
        return gameIncomestatPower;
    }
    public void setAllowGeneration(Integer allowGeneration) 
    {
        this.allowGeneration = allowGeneration;
    }

    public Integer getAllowGeneration() 
    {
        return allowGeneration;
    }
    public void setCpsRegistrationPower(Integer cpsRegistrationPower) 
    {
        this.cpsRegistrationPower = cpsRegistrationPower;
    }

    public Integer getCpsRegistrationPower() 
    {
        return cpsRegistrationPower;
    }
    public void setReplaceTaxRate(Double replaceTaxRate) 
    {
        this.replaceTaxRate = replaceTaxRate;
    }

    public Double getReplaceTaxRate() 
    {
        return replaceTaxRate;
    }
    public void setTaxRate(Double taxRate) 
    {
        this.taxRate = taxRate;
    }

    public Double getTaxRate() 
    {
        return taxRate;
    }
    public void setLogo(String logo) 
    {
        this.logo = logo;
    }

    public String getLogo() 
    {
        return logo;
    }
    public void setSearchAscripUserPower(Integer searchAscripUserPower) 
    {
        this.searchAscripUserPower = searchAscripUserPower;
    }

    public Integer getSearchAscripUserPower() 
    {
        return searchAscripUserPower;
    }
    public void setIosRechargePower(Integer iosRechargePower) 
    {
        this.iosRechargePower = iosRechargePower;
    }

    public Integer getIosRechargePower() 
    {
        return iosRechargePower;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("qq", getQq())
            .append("mobile", getMobile())
            .append("contact", getContact())
            .append("userId", getUserId())
            .append("promoterId", getPromoterId())
            .append("createTime", getCreateTime())
            .append("settleStartDate", getSettleStartDate())
            .append("settlePeriod", getSettlePeriod())
            .append("settleType", getSettleType())
            .append("agentChannelId", getAgentChannelId())
            .append("agentUserId", getAgentUserId())
            .append("accountName", getAccountName())
            .append("accountBank", getAccountBank())
            .append("accountNumber", getAccountNumber())
            .append("model", getModel())
            .append("enabled", getEnabled())
            .append("subUser", getSubUser())
            .append("acronym", getAcronym())
            .append("cooperaState", getCooperaState())
            .append("fullName", getFullName())
            .append("channelProfitpower", getChannelProfitpower())
            .append("registrationPower", getRegistrationPower())
            .append("rechargePower", getRechargePower())
            .append("gameIncomestatPower", getGameIncomestatPower())
            .append("allowGeneration", getAllowGeneration())
            .append("cpsRegistrationPower", getCpsRegistrationPower())
            .append("replaceTaxRate", getReplaceTaxRate())
            .append("taxRate", getTaxRate())
            .append("logo", getLogo())
            .append("searchAscripUserPower", getSearchAscripUserPower())
            .append("iosRechargePower", getIosRechargePower())
            .toString();
    }
}
